<template>
  <div class="userinfo">
    <el-descriptions title="个人信息" :column="column">
      <el-descriptions-item contentStyle="font-weight:550" label="账号">{{
        userinfo.name
      }}</el-descriptions-item>
      <el-descriptions-item label="姓名">{{
        userinfo.name
      }}</el-descriptions-item>
      <el-descriptions-item label="密码">{{
        userinfo.passWord
      }}</el-descriptions-item>
      <el-descriptions-item label="工号">{{
        userinfo.jobNumber
      }}</el-descriptions-item>
      <el-descriptions-item label="手机号">{{
        userinfo.phone
      }}</el-descriptions-item>
      <el-descriptions-item label="头像" />
    </el-descriptions>
    <div class="block">
      <el-image style="width: 10%; height: 5%;" :src="src"></el-image>
    </div>
  </div>
</template>

<script>
import axios from "axios";
export default {
  data() {
    return {
      userinfo: null, //用户信息
      src: "", // 图片url
      column: 1,
    };
  },

  created() {
    //获取本地用户信息
    this.userinfo = JSON.parse(
      window.localStorage.getItem("userinfo")
    ).personnel;
    this.src =
      axios.defaults.baseURL +
      "centre/centre/file/getPhoto/" +
      this.userinfo.photo;
  },
};
</script>

<style lang="scss" scoped>
</style>